package com.vehicle.repair.repository;

import com.vehicle.repair.model.User;
import com.vehicle.repair.model.Vehicle;
import com.vehicle.repair.model.WorkOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface WorkOrderRepository extends JpaRepository<WorkOrder, Integer> {
    List<WorkOrder> findByUser(User user);
    
    List<WorkOrder> findByVehicle(Vehicle vehicle);
    
    List<WorkOrder> findByStatus(WorkOrder.OrderStatus status);
    
    List<WorkOrder> findByUserAndStatus(User user, WorkOrder.OrderStatus status);
}
